import 'package:get/get.dart';
import 'package:guochaoapp/common/constant/order_constant.dart';
import 'package:guochaoapp/common/constant/to_order_detail_source.dart';
import 'package:guochaoapp/model/transterpay_entity.dart';
import 'package:guochaoapp/routes/app_pages.dart';

class GCShoppingPaymenntSuccessController extends GetxController {

  toDetail() {
    Get.toNamed(Routes.ORDER_DETAIL, arguments: [Get.arguments["mallOrderNo"], OrderConstant.statusInit, ToOrderDetailSource.payfaildTo]);
  }

  getTitleTipText() {
    TransterpayData paymentData = Get.arguments["paymentData"];
    if(paymentData != null) {
      bool skipPaySuccess = paymentData.skipPaySuccess;
      if(skipPaySuccess == true) {
        String price = Get.arguments["price"];

        return "余额支付" + price + "元";
      }
    } else {
      return "";
    }
  }
}
